#include <iostream>
#include "./Tree/MultiTree/TemplateTree.h"
#include "./Tree/MultiTree/TemplateNode.h"
#include "./Tree/MultiTree/BasicTree.h"
#include "./Tree/MultiTree/LimitTree.h"
#include "./Tree/MultiTree/DenseTree.h"
using namespace std ;
using namespace TREE;



int main() {
    auto tree = TemplateTree<BasicTreeNode<int>>(
            new BasicTreeNode<int> (10)
            );
//    tree.root()->setChild(tree.root() , 1);



    auto l4r = TemplateTree<LimitNode<int , 4>>(
            new LimitNode<int , 4 >(4)
            ) ;

    for (int i = 0 ; i < 10 ; i ++){
        l4r.root()->setChild(new LimitNode<int , 3> (i * 4) , i ) ;
    }

    for (int i = 0 ; i < 10 ; i ++){
        l4r.root()->setChild(new LimitNode<int , 4> (i * 4) , i ) ;
    }
    tree.root()->setChild(l4r.root() , 2);

    using dT = DenseTree<int>;
    dT dt (dT::to_node(-100));
    for (int i = 1 ; i <= 50 ; i ++){
        dt.root()->setChild(
                - i ,
                i
                );
    }

//    dt.levelOrder([](Node<int>* node){
//        if (node)
//            cout << node->data();
//        else
//            cout << "#" ;
//        cout << " " ;
////        cout << endl ;
//        return true;
//    });

    tree.root()->setChild(dt.root() , 5) ;

    tree.levelOrder([](Node<int>* node){
        if (node)
            cout << node->data();
        else
            cout << "#" ;
        cout << " " ;
//        cout << endl ;
        return true;
    });
}
